package org.dtrd.modules.record.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.dtrd.modules.record.entity.bean.DailyGroupCheckinRecord;
import org.dtrd.modules.record.entity.bean.DailySugarRecordBean;
import org.dtrd.modules.record.entity.po.DtrdViewRlCheckinRecord;

import java.util.List;

/**
 * @author 萧
 * @date 2021-12-05 09:30:04
 **/
public interface IDtrdViewRlCheckinRecordService extends IService<DtrdViewRlCheckinRecord> {

    /**
     * 查询时间段内每日打卡记录并插入周月数据
     *
     * @param patientId
     * @param startTime
     * @param endTime
     * @return
     */
    List<DailyGroupCheckinRecord> selectCheckinRecords(Integer patientId, String startTime, String endTime);

    /**
     * 查询时间段内每日打卡记录
     *
     * @param patientId
     * @param startTime
     * @param endTime
     * @return
     */
    List<DailyGroupCheckinRecord> getCheckinRecords(Integer patientId, String startTime, String endTime,boolean isDateDesc);

    List<DtrdViewRlCheckinRecord> selectCheckinRecordsByRecordTypes(Integer patientId, String startTime, String endTime, String recordTypes);

    List<DtrdViewRlCheckinRecord> selectCheckinGroupRecordsByRecordTypes(Integer patientId, String startTime, String endTime, String recordTypes);

    /**
     * 分页获取日期血糖记录
     *
     * @param patientId
     * @param startDate
     * @param endDate
     * @param page
     * @param pageSize
     * @return
     */
    List<DailySugarRecordBean> getDailySugarRecord(Integer patientId, String startDate, String endDate, Integer page, Integer pageSize);
}
